package com.kira.scaffoldmvc.POJO.Annotation;


import com.kira.scaffoldmvc.Utils.CheckAccountValidation;
import jakarta.validation.Constraint;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Target({ElementType.PARAMETER,ElementType.METHOD,ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {CheckAccountValidation.class})
public @interface Check {

    //这个是返回我们的错误信息
String message() default "账号参数不合法,账号长度要求6-10以内，且第一位不能为0和只能为数字和不能为空";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
